Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive Japanese language support to the Ropy clipboard manager application, including full translations and integration with the existing i18n system.
Changes:
- Added Japanese as a new supported language variant with proper serialization and display name
- Created a complete Japanese translation file (ja.toml) with 63 translation keys
- Added
settings_buttontranslation key to all locale files (en, zh-CN, ja) and updated the GUI to use it
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/i18n/mod.rs | Added Japanese language enum variant, display name, inclusion in all() method, translation loading, and updated tests |
| assets/locales/ja.toml | New file with complete Japanese translations for all application strings |
| assets/locales/en.toml | Added missing settings_button translation key |
| assets/locales/zh-CN.toml | Added missing settings_button translation key |
| src/gui/board/render.rs | Updated settings button tooltip to use i18n translation instead of hardcoded string |
| let content = match language { | ||
| Language::English => include_str!("../../assets/locales/en.toml"), | ||
| Language::ChineseSimplified => include_str!("../../assets/locales/zh-CN.toml"), | ||
| Language::Japanese => include_str!("../../assets/locales/ja.toml"), |
There was a problem hiding this comment.
The existing tests for I18n initialization and language switching only cover English and Chinese languages. Consider adding a test case to verify that Japanese translations can be loaded successfully, similar to the existing test_i18n_initialization test but with Language::Japanese, or extending test_i18n_language_switch to include switching to Japanese.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.